<?php

/**
 * Application Models
 *
 * @package Application_Model
 * @subpackage Model
 * @author <SONIA ZRIBI>
 * @copyright ZF model generator
 * @license http://framework.zend.com/license/new-bsd     New BSD License
 */

/**
 * Abstract class for models
 */
require_once 'ModelAbstract.php';

/**
 * 
 *
 * @package Application_Model
 * @subpackage Model
 * @author <SONIA ZRIBI>
 */
class Application_Model_Statcourseweek extends Application_Model_ModelAbstract
{

    /**
     * Database var type int(11)
     *
     * @var int
     */
    protected $_Idstatcourseweek;

    /**
     * Database var type int(11)
     *
     * @var int
     */
    protected $_NbreLecons;

    /**
     * Database var type int(11)
     *
     * @var int
     */
    protected $_NbreActiv;

    /**
     * Database var type int(11)
     *
     * @var int
     */
    protected $_AutoEvaluation;

    /**
     * Database var type int(11)
     *
     * @var int
     */
    protected $_NbreTotActivites;

    /**
     * Database var type int(11)
     *
     * @var int
     */
    protected $_NbreDevoirNote;

    /**
     * Database var type int(11)
     *
     * @var int
     */
    protected $_Nbremsgtut;

    /**
     * Database var type int(11)
     *
     * @var int
     */
    protected $_Nbremsgetud;

    /**
     * Database var type tinyint(4)
     *
     * @var int
     */
    protected $_InterRetroaction;

    /**
     * Database var type date
     *
     * @var date
     */
    protected $_LastCnxTut;

    /**
     * Database var type date
     *
     * @var date
     */
    protected $_LastCnxEtud;



    /**
     * Sets up column and relationship lists
     */
    public function __construct()
    {
        parent::init();
        $this->setColumnsList(array(
            'idstatcourseweek'=>'Idstatcourseweek',
            'nbre_lecons'=>'NbreLecons',
            'nbre_activ'=>'NbreActiv',
            'auto_evaluation'=>'AutoEvaluation',
            'nbre_tot_activites'=>'NbreTotActivites',
            'nbre_devoir_note'=>'NbreDevoirNote',
            'nbremsgtut'=>'Nbremsgtut',
            'nbremsgetud'=>'Nbremsgetud',
            'inter_retroaction'=>'InterRetroaction',
            'last_cnx_tut'=>'LastCnxTut',
            'last_cnx_etud'=>'LastCnxEtud',
        ));

        $this->setParentList(array(
        ));

        $this->setDependentList(array(
        ));
    }

    /**
     * Sets column idstatcourseweek
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setIdstatcourseweek($data)
    {
        $this->_Idstatcourseweek = $data;
        return $this;
    }

    /**
     * Gets column idstatcourseweek
     *
     * @return int
     */
    public function getIdstatcourseweek()
    {
        return $this->_Idstatcourseweek;
    }

    /**
     * Sets column nbre_lecons
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setNbreLecons($data)
    {
        $this->_NbreLecons = $data;
        return $this;
    }

    /**
     * Gets column nbre_lecons
     *
     * @return int
     */
    public function getNbreLecons()
    {
        return $this->_NbreLecons;
    }

    /**
     * Sets column nbre_activ
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setNbreActiv($data)
    {
        $this->_NbreActiv = $data;
        return $this;
    }

    /**
     * Gets column nbre_activ
     *
     * @return int
     */
    public function getNbreActiv()
    {
        return $this->_NbreActiv;
    }

    /**
     * Sets column auto_evaluation
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setAutoEvaluation($data)
    {
        $this->_AutoEvaluation = $data;
        return $this;
    }

    /**
     * Gets column auto_evaluation
     *
     * @return int
     */
    public function getAutoEvaluation()
    {
        return $this->_AutoEvaluation;
    }

    /**
     * Sets column nbre_tot_activites
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setNbreTotActivites($data)
    {
        $this->_NbreTotActivites = $data;
        return $this;
    }

    /**
     * Gets column nbre_tot_activites
     *
     * @return int
     */
    public function getNbreTotActivites()
    {
        return $this->_NbreTotActivites;
    }

    /**
     * Sets column nbre_devoir_note
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setNbreDevoirNote($data)
    {
        $this->_NbreDevoirNote = $data;
        return $this;
    }

    /**
     * Gets column nbre_devoir_note
     *
     * @return int
     */
    public function getNbreDevoirNote()
    {
        return $this->_NbreDevoirNote;
    }

    /**
     * Sets column nbremsgtut
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setNbremsgtut($data)
    {
        $this->_Nbremsgtut = $data;
        return $this;
    }

    /**
     * Gets column nbremsgtut
     *
     * @return int
     */
    public function getNbremsgtut()
    {
        return $this->_Nbremsgtut;
    }

    /**
     * Sets column nbremsgetud
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setNbremsgetud($data)
    {
        $this->_Nbremsgetud = $data;
        return $this;
    }

    /**
     * Gets column nbremsgetud
     *
     * @return int
     */
    public function getNbremsgetud()
    {
        return $this->_Nbremsgetud;
    }

    /**
     * Sets column inter_retroaction
     *
     * @param int $data
     * @return Application_Model_Statcourseweek
     */
    public function setInterRetroaction($data)
    {
        $this->_InterRetroaction = $data;
        return $this;
    }

    /**
     * Gets column inter_retroaction
     *
     * @return int
     */
    public function getInterRetroaction()
    {
        return $this->_InterRetroaction;
    }

    /**
     * Sets column last_cnx_tut
     *
     * @param date $data
     * @return Application_Model_Statcourseweek
     */
    public function setLastCnxTut($data)
    {
        $this->_LastCnxTut = $data;
        return $this;
    }

    /**
     * Gets column last_cnx_tut
     *
     * @return date
     */
    public function getLastCnxTut()
    {
        return $this->_LastCnxTut;
    }

    /**
     * Sets column last_cnx_etud
     *
     * @param date $data
     * @return Application_Model_Statcourseweek
     */
    public function setLastCnxEtud($data)
    {
        $this->_LastCnxEtud = $data;
        return $this;
    }

    /**
     * Gets column last_cnx_etud
     *
     * @return date
     */
    public function getLastCnxEtud()
    {
        return $this->_LastCnxEtud;
    }

    /**
     * Returns the mapper class for this model
     *
     * @return Application_Model_Mapper_Statcourseweek
     */
    public function getMapper()
    {
        if ($this->_mapper === null) {
            $this->setMapper(new Application_Model_Mapper_Statcourseweek());
        }

        return $this->_mapper;
    }

    /**
     * Deletes current row by deleting the row that matches the primary key
     *
	 * @see Application_Model_Mapper_Statcourseweek::delete
     * @return int|boolean Number of rows deleted or boolean if doing soft delete
     */
    public function deleteRowByPrimaryKey()
    {
        if ($this->getIdstatcourseweek() === null) {
            throw new Exception('Primary Key does not contain a value');
        }

        return $this->getMapper()
                    ->getDbTable()
                    ->delete('idstatcourseweek = ' .
                             $this->getMapper()
                                  ->getDbTable()
                                  ->getAdapter()
                                  ->quote($this->getIdstatcourseweek()));
    }
}
